package com.hbnu.exception;

import java.util.Scanner;

/**
 * @author kittychen
 * @date 2025-09-28 10:14
 */
public class ExceptionDemo06 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();

        System.out.println(method(a));
    }

    private static int method(int a) {
        if (a == 0) {
            throw new RuntimeException("a不能为0");
        } else {
            return 1 / a;
        }
    }
}
